//云认养区域管理
export const tableOption = {
  ...window.$crudMixins.tableOptions,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  menuWidth: 180,
  viewBtn: false,
  column: [
    {
      label: '所属爱心收容站',
      prop: 'baseName',
      overHidden: true,
    },
    {
      label: '区域名称',
      prop: 'name',
      overHidden: true,
      search: true,
    },
    {
      label: '区域寓意',
      prop: 'moral',
      overHidden: true,
    },
    {
      label: '猫咪数量',
      prop: 'petNumber',
    },
    {
      label: '排序值',
      prop: 'sort',
    },
    {
      label: '创建时间',
      prop: 'createTime',
      width: 150,
    },
  ],
};
//新增区域
export const areaFormOption = {
  labelWidth: 150,
  submitBtn: false,
  emptyBtn: false,
  column: [
    {
      label: '所属爱心收容站',
      prop: 'baseId',
      row: true,
      type: 'select',
      dicUrl: '/core/base/list',
      props: {
        label: 'name',
        value: 'id',
      },
      rules: [
        {
          required: true,
          message: '请选择所属爱心收容站',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '区域名称',
      prop: 'name',
      maxlength: 5,
      row: true,
      showWordLimit: true,
      rules: [
        {
          required: true,
          message: '请输入区域名称',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '区域寓意',
      prop: 'moral',
      maxlength: 10,
      row: true,
      type: 'textarea',
      showWordLimit: true,
      rules: [
        {
          required: true,
          message: '请输入区域寓意',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '排序值',
      prop: 'sort',
      min: 1,
      max: 999999,
      span: 12,
      row: true,
      value: '1',
      rules: [
        {
          required: true,
          message: '请输入排序值',
          trigger: 'blur',
        },
        {
          pattern: /^[0-9]*[1-9][0-9]*$/,
          message: '排序只能输入正整数',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '有喵首页icon图',
      prop: 'icon',
      type: 'upload',
      listType: 'picture-img',
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      row: true,
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '建议上传png的图片,尺寸为1:1的图',
      accept: '.png',
      limit: 1,
      rules: [
        {
          required: true,
          message: '请上传有喵首页icon图',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '有喵首页云认养中猫咪标签图',
      prop: 'inAdoptPic',
      type: 'upload',
      listType: 'picture-img',
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '建议上传png的图片,<br/>有喵首页【被爱供养的猫咪】板块根据猫咪所属区域展示区域标签图',
      accept: '.png',
      limit: 1,
      rules: [
        {
          required: true,
          message: '请上传有喵首页云认养中猫咪标签图',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '有喵首页待领养猫咪标签图',
      prop: 'waitAdoptPic',
      type: 'upload',
      listType: 'picture-img',
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '建议上传png的图片,<br/>有喵首页【猫咪大本营】板块根据猫咪所属区域展示区域标签图',
      accept: '.png',
      limit: 1,
      rules: [
        {
          required: true,
          message: '请上传有喵首页待领养猫咪标签图',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '有喵详情页标签图',
      prop: 'detailPic',
      type: 'upload',
      listType: 'picture-img',
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '建议上传png的图片,<br/>有喵详情页【猫咪】板块根据猫咪所属区域展示区域标签图',
      accept: '.png',
      limit: 1,
      rules: [
        {
          required: true,
          message: '请上传有喵详情页标签图',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '云认养成功飘屏动图(APP)',
      prop: 'succeedAdoptPic',
      type: 'upload',
      listType: 'picture-img',
      formslot: true,
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '用户进入app时，根据猫咪所属区域展示云认养成功飘屏动图',
      accept: '.json',
      limit: 1,
      rules: [
        {
          required: true,
          message: '请上传云认养成功飘屏动图',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '云认养成功飘屏动图(小程序)',
      prop: 'mpSucceedAdoptPic',
      type: 'upload',
      listType: 'picture-card',
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      multiple: true,
      span: 24,
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '用户进入小程序时，根据猫咪所属区域展示云认养成功飘屏动图，请上传png格式的动画',
      accept: '.png',
      limit: 4,

      rules: [
        {
          required: true,
          message: '请上传云认养成功飘屏动图',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '云认养证书模版',
      prop: 'adoptCertificatePic',
      type: 'upload',
      listType: 'picture-img',
      fileSize: 10 * 1024,
      propsHttp: {
        name: 'hash',
        url: 'key',
      },
      fileType: 'img', //img/video/audio
      // action: 'http://upload-z2.qiniup.com',
      oss: 'qiniu',
      tip: '建议上传png的图片,<br/>云认养猫咪成功时，根据猫咪所属区域展示区域的云认养证书',
      accept: '.png',
      limit: 1,
      rules: [
        {
          required: true,
          message: '请上传云认养证书模版',
          trigger: 'blur',
        },
      ],
    },
    {
      label: '云认养证书区域字体颜色设置',
      prop: 'certificateColor',
      type: 'color',
      colorFormat: 'hex',
      showAlpha: false,
      tip: '云认养猫咪成功时，根据猫咪所属区域展示区域信息',
      rules: [
        {
          required: true,
          message: '请设置云认养证书区域字体颜色设置',
          trigger: 'blur',
        },
      ],
    },
  ],
};
//猫咪列表
export const catOption = {
  ...window.$crudMixins.tableOptions,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  menu: false,
  viewBtn: false,
  column: [
    {
      label: '快照',
      prop: 'petAvatar',
      slot: true,
      width: 60,
    },
    {
      label: '宠物编号',
      slot: true,
      prop: 'petCode',
      width: 100,
    },
    {
      label: '昵称',
      prop: 'petNickname',
      overHidden: true,
    },
    {
      label: '品种',
      prop: 'petVarietyName',
    },
    {
      label: '性别',
      prop: 'petGender',
    },
    {
      label: '认养人',
      slot: true,
      prop: 'adoptUserNickname',
      width: 150,
    },
    {
      label: '负责人',
      prop: 'feedUserNicknames',
    },
    {
      label: '云养开始时间',
      prop: 'startTime',
      width: 160,
    },
    {
      label: '云养到期时间',
      prop: 'endTime',
      width: 160,
    },
  ],
};
